/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface FireHazardProcess extends BasicModel<FireHazardProcess> {
  hazardType?: string; // 隐患类型
  enterpriseId?: string; // 企业ID
  enterpriseName?: string; // 企业名称
  buildId?: number; // 建筑ID
  buildName?: string; // 建筑名称
  regionId?: number; // 区域ID
  regionName?: string; // 区域名称
  maintenanceEnterprise?: string; // 维保企业
  fireDepartment?: string; // 消防队
  hazardDescription?: string; // 隐患说明
  handlingMethod?: string; // 判断处理方式
  selfRepairMethod?: string; // 自行修理隐患方式
  imageUrl?: string; // 上传图片URL
  videoUrl?: string; // 上传视频URL
  currentlyTimeout?: string; // 是否超时
  timeoutAlert?: string; // 超时提示内容
  createTime?: string; // 创建时间
  delayTime?: string; // 延期时间
  supervisorName?: string; // 监督员姓名
  supervisorCode?: string; // 监督员code
  processStatus?: string; // 流程状态  已完成  未完成
  dangerId?: number; // 消防隐患ID
  tid?:string;
}

export const fireHazardProcessList = (params?: FireHazardProcess | any) =>
  defHttp.get<FireHazardProcess>({ url: adminPath + '/firehazardprocess/list', params });

export const fireHazardProcessListData = (params?: FireHazardProcess | any) =>
  defHttp.post<Page<FireHazardProcess>>({ url: adminPath + '/firehazardprocess/listData', params });

export const fireHazardProcessForm = (params?: FireHazardProcess | any) =>
  defHttp.get<FireHazardProcess>({ url: adminPath + '/firehazardprocess/form', params });

export const fireHazardProcessSave = (params?: any, data?: FireHazardProcess | any) =>
  defHttp.postJson<FireHazardProcess>({ url: adminPath + '/firehazardprocess/save', params, data });

export const fireHazardProcessDelete = (params?: FireHazardProcess | any) =>
  defHttp.get<FireHazardProcess>({ url: adminPath + '/firehazardprocess/delete', params });
